<?php

namespace App\Http\Controllers\Admin\Orders;

use App\Http\Controllers\Controller as BaseController;
use App\Repository\Orders\OrdersLogisticsRepository;
use Illuminate\Http\Request;

// 专门处理物流
class LogisticsController extends BaseController
{
    private $repoist;

    public function __construct(OrdersLogisticsRepository $repository)
    {
        $this->repoist = $repository;
    }

    public function getTimeline(Request $request)
    {
        if (!$request->get('number')) {
            return $this->returnMsg(1, '物流单号', []);
        }
        $data = $this->repoist->getTimeline($request->get('number'));
        return $this->returnMsg(200, '查询完毕', $data);
    }

}
